package th.kmutt.se.is;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class ChargesAdd extends Activity implements OnClickListener {

	Button chargesTypeUnit, chargesTypeMonth;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.screen_charges_add);
		init();
	}

	private void init() {
		chargesTypeUnit = (Button) findViewById(R.id.chargesTypeUnit);
		chargesTypeMonth = (Button) findViewById(R.id.chargesTypeMonth);

		chargesTypeUnit.setOnClickListener(this);
		chargesTypeMonth.setOnClickListener(this);

		process();
	}

	private void process() {

	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.chargesTypeUnit: {
			chargesTypeUnit.setBackgroundResource(R.drawable.btn_normal_active);
			chargesTypeMonth.setBackgroundResource(R.drawable.btn_normal);
			chargesTypeUnit.setTextColor(getResources().getColor(R.color.color01));
			chargesTypeMonth.setTextColor(getResources().getColor(R.color.color10));
		}
			break;
		case R.id.chargesTypeMonth: {
			chargesTypeUnit.setBackgroundResource(R.drawable.btn_normal);
			chargesTypeMonth.setBackgroundResource(R.drawable.btn_normal_active);
			chargesTypeUnit.setTextColor(getResources().getColor(R.color.color10));
			chargesTypeMonth.setTextColor(getResources().getColor(R.color.color01));
		}
			break;
		}
	}
}
